import java.util.Comparator;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: dell
 * Date: 2023-11-28
 * Time: 18:34
 */
class A implements Comparator<Student>{
    @Override
    public int compare(Student o1, Student o2) {
        return o1.age-o2.age;
    }
}
class B implements Comparator<Student>{
    @Override
    public int compare(Student o1, Student o2) {
        return (int)(o1.soure-o2.soure);
    }
}
public class test3 {
    public static void main(String[] args) {
        Student student1=new Student("add",11,88.8);
        Student student2=new Student("cdd",12,78.8);
        A a=new A();
        int ret=a.compare( student1, student2);
        System.out.println(ret);
        B b=new B();
        ret=b.compare( student1, student2);
        System.out.println(ret);
    }
}